package ija.model.players;

import ija.model.types.FigureColor;
import ija.model.types.FigureDirection;
import ija.xls.notation.GameMove;

/**
 * 
 * @author Radek Necas, xnecas18
 */
public class ComputerPlayer extends Player {

	int level;

	public ComputerPlayer() {
		super();
	}

	public ComputerPlayer(String name, FigureColor color, FigureDirection direction, int level) {
		super(name, color, direction);
		this.level = level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public int getLevel() {
		return this.level;
	}

	public GameMove calculateMove() {
		GameMove Move = new GameMove();
		return Move;
	}

	@Override
	public String toString() {
		String s = super.toString();
		s += " level: " + this.level;
		return s;
	}

	@Override
	public void copyFrom(Player p) {
		super.copyFrom(p);
		if (p instanceof ComputerPlayer) {
			this.setLevel(((ComputerPlayer) p).getLevel());
		}
	}

	@Override
	public ComputerPlayer duplicate() {
		ComputerPlayer p = new ComputerPlayer();
		p.copyFrom(this);
		return p;
	}
}
